#ifndef PARAMREPDIALOG_H
#define PARAMREPDIALOG_H

#include <QDialog>
#include <QtWidgets>
#include "Image.h"
#include "../../detiq-t/GenericInterface/Widgets/ImageWidgets/ImageWindow.h"
#include "../../detiq-t/GenericInterface/Widgets/ImageWidgets/DoubleImageWindow.h"
#include "../../detiq-t/GenericInterface/Widgets/ImageWidgets/StandardImageWindow.h"
#include "../../detiq-t/GenericInterface/Other/ParamRep.h"

using namespace imagein;
using namespace genericinterface;

namespace Ui {
class ParamRepDialog;
}

class ParamRepDialog : public QDialog
{
    Q_OBJECT
    
public:
    explicit ParamRepDialog(QWidget *parent = 0, const ImageWindow *from=NULL, ImageWindow::Mode mode=ImageWindow::CONS);
    ~ParamRepDialog();
    ParamRep * getParam();
    enum OPER{RIEN,CUT,ABS,NORM};
    enum ROW{MIN=0,MEAN,MAX,STDDEV};
    enum COLUMN{RED=0,GREEN,BLUE};
    
private:
    Ui::ParamRepDialog *ui;    
    int _maxtotal;
    int _mintotal;
    int _valuemode;
    int _valuemin;
    int _valuemax;
    int _valuecenter;
    QSpinBox *_spintemp;
    QCheckBox *_checktemp;
    QRadioButton *_radiotemp;
    ImageWindow::Mode _mode;

protected:
    void initCut(bool activate);
    void updateCut(bool activate);
    void initAbs(bool activate);
    void updateAbs(bool activate);
    void initStretch(bool activate);
    void updateStretch(bool activate);
    void updateOptionStretch(QRadioButton* button);
    void initRound(const ImageWindow *from);
    void init(const ImageWindow *from);
    int returnOrd(int ord);    
    void initInfo(const ImageWindow *from);
    void initConvert(const ImageWindow *from);
    void initLog();
    void initImage()
;
public slots:
    void ToggleOp();
    void CheckOrder();
    void CheckCut();
    void CheckStretch();
    void ManageButton();
    void reacRadioMem(bool val);
    void reacPosConv(bool val);
    void reacLog(bool val);

};

#endif // PARAMREPDIALOG_H
